home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10493 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: lassen.cnw.com!matt!matt
  2. From: matt@matt.fidalgo.net (Matt Gischer)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: ***NEED HELP WITH CALCULATION FUNCTION*** ASAP
  5. Date: Mon, 18 Mar 1996 08:03:40 GMT
  6. Organization: Uncle Fran's Musical Forest
  7. Message-ID: <DoGEE5.12B@matt.fidalgo.net>
  8. References: <4i0mva$j0c@fountain.mindlink.net> <4if39b$d2h@castle.nando.net>
  9. NNTP-Posting-Host: fidnet-30.fidalgo.net
  10. X-Newsreader: TIN [UNIX 1.3 BETA-950824-color PL0]
  11.  
  12. Bill McCarthy (actuary@nando.net) wrote:
  13. : >The user is allowed to enter the annual rate of interest either as a 
  14. : >percentage eg. 15 or enter as a decimal eg. .15. If the user enters the
  15. : >annual rate of interest as a percentage eg. 15, then divide by 100
  16. : >before using it in the formula.
  17. : >
  18. : >Any ideas how I could code this test?
  19. : Your description doesn't make any sence.  One user may type 15
  20. : meaning 15%, another might intend 1500%.  Likewise .15 may be
  21. : a fractional representation of 15% of a percentage representation
  22. : of 15 basis points.
  23. : BTW, does any of this have anything to do with C?
  24. : Bill McCarthy
  25. : actuary@nando.net
  26. : Wendell, NC  USA
  27.  
  28. It makes a lot of _sense_.  It could be done easily with an if.
  29. if(p>1) p=p/100; would be simple enough.
  30.